<?php

use App\Models\Company;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;

class CompanyModulePivotTableSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
    	$modules = DB::table('modules')->pluck('code');
		/**
		 * @var Company $company
		 */
    	$company = Company::findOrFail(1);
    	$company->modules()->sync($modules);
    }
}
